package com.wzy.exportexcel.panda.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;

/**
 * @TableName panda
 */
@Data
public class Panda implements Serializable {
    /**
     *
     */
    @ExcelProperty("ID")
    private Long id;

    /**
     *
     */
    @ExcelProperty("姓名")
    private String name;

    /**
     *
     */
    @ExcelProperty("昵称")
    private String nickname;

    /**
     *
     */
    @ExcelProperty("编码")
    private String uniqueCode;

    /**
     *
     */
    @ExcelProperty("性别")
    private Integer sex;

    /**
     *
     */
    @ExcelProperty("身高")
    private BigDecimal height;

    /**
     *
     */
    @ExcelProperty("出生日期")
    @DateTimeFormat("yyyy-MM-dd")
    private Date birthday;

    /**
     *
     */
    @ExcelProperty("等级")
    private String level;

    /**
     *
     */
    @ExcelProperty("座右铭")
    private String motto;

    /**
     *
     */
    @ExcelProperty("所在地址")
    private String address;

    /**
     *
     */
    @ExcelProperty("图片")
    private String pic;

    /**
     *
     */
    @ExcelProperty("时间")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Panda other = (Panda) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
                && (this.getUniqueCode() == null ? other.getUniqueCode() == null : this.getUniqueCode().equals(other.getUniqueCode()))
                && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
                && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
                && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
                && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
                && (this.getMotto() == null ? other.getMotto() == null : this.getMotto().equals(other.getMotto()))
                && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
                && (this.getPic() == null ? other.getPic() == null : this.getPic().equals(other.getPic()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getUniqueCode() == null) ? 0 : getUniqueCode().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getMotto() == null) ? 0 : getMotto().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getPic() == null) ? 0 : getPic().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", nickname=").append(nickname);
        sb.append(", uniqueCode=").append(uniqueCode);
        sb.append(", sex=").append(sex);
        sb.append(", height=").append(height);
        sb.append(", birthday=").append(birthday);
        sb.append(", level=").append(level);
        sb.append(", motto=").append(motto);
        sb.append(", address=").append(address);
        sb.append(", pic=").append(pic);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}